package VWorldGameStudio;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.ArrayList;

public class FCMapAndMsEntity implements Serializable {

    //区域界限
    public int[] startXY = new int[]{0,0};
    public int[] endXY = new int[]{0,0};

    @Getter
    @Setter
    private int level = 1;//优先级1最低，2， 3最大

    public String toString(){
        return "开始："+startXY[0]+"*"+startXY[1]+" 结束:"+endXY[0]+"*"+endXY[1]+" 区域等级:"+level;
    }

    @Getter
    private ArrayList<MS> monsterIds = new ArrayList<>(0);

    public void addMS(MS ms){
        for(MS m: monsterIds){
            if(m.id.equals(ms.id)){
                return;
            }
        }
        monsterIds.add(ms);
    }

    public static class MS implements Serializable{

        public MS(String i, int level){
            id = i;
            triggerLvel = level;
        }
        public String id;

        public int triggerLvel = 1;

        public String toString(){
            return "遇怪几率:"+triggerLvel+"     怪物ID:"+id;
        }
    }

}
